package com.tdtxdcxm.telmanagesys.configcolor;


import com.tdtxdcxm.telmanagesys.slice.MainAbilitySlice;
import ohos.agp.colors.RgbColor;
import ohos.agp.components.DirectionalLayout;
import ohos.agp.components.element.Element;
import ohos.agp.components.element.ShapeElement;
import ohos.agp.render.ColorMatrix;

public class BottomBarColor {
    public static void setBottomBarColor(DirectionalLayout ddl3,int i){
        switch (i){
            case 0:
                ddl3.setBackground(BottomBarColor.defaultShapeElement());
                break;
            case 1:
                ddl3.getBackgroundElement().setColorMatrix(new ColorMatrix(BottomBarColor.darkcolor));
                break;
            case 2:
                ddl3.getBackgroundElement().setColorMatrix(new ColorMatrix(BottomBarColor.lightcolor));
                break;
            case 3:
                ddl3.getBackgroundElement().setColorMatrix(new ColorMatrix(BottomBarColor.simplecolor));
                break;
            default:
                break;
        }
    }
    public static ShapeElement defaultShapeElement(){
        ShapeElement shapeElement = new ShapeElement();
        RgbColor rgbColor = new RgbColor();
        rgbColor.setRed(255);
        rgbColor.setGreen(255);
        rgbColor.setBlue(255);
        rgbColor.setAlpha(28);

        shapeElement.setRgbColor(rgbColor);
        rgbColor.setRed(139);
        rgbColor.setGreen(69);
        rgbColor.setBlue(19);
        rgbColor.setAlpha(100);
        shapeElement.setStroke(9,rgbColor);
        shapeElement.setCornerRadius(50);
        return shapeElement;
    }
    //CornflowerBlue	矢车菊的蓝色	#6495ED	100,149,237
    public static final float[] onclickfloats = {  0,0,0,0,100,
                                                    0,0,0,0,149,
                                                    0,0,0,0,237,
                                                    0,0,0,0,80};
    public static final float[] darkcolor = {0, 0, 0, 0, 47,
                                             0, 0, 0, 0, 79,
                                             0, 0, 0, 0, 79,
                                             0, 0, 0, 0, 90
                                            };
    public static final float[] lightcolor = {  0, 0, 0, 0, 175,
                                                0, 0, 0, 0, 238,
                                                0, 0, 0, 0, 238,
                                                0, 0, 0, 0, 100
                                             };
    public static final float[] simplecolor = { 0, 0, 0, 0, 221,
                                                0, 0, 0, 0, 219,
                                                0, 0, 0, 0, 219,
                                                0, 0, 0, 0, 28
                                              };
    private BottomBarColor(){

    }
}
